<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of VWidgets
 *
 * @author andrea
 */
class VWidgets_vidwiz extends View_vidwiz {
    
    public function get_searchbox($lastVideos){
        $debug = USingleton_vidwiz::getInstances("UDebug_vidwiz");
        $wid = $this->getResultsVideosSearchPalinsesto($lastVideos);
        return $wid;
    }
        /**
     *
     * @param array $videos i video da inserire nel template
     * @return string il tempalte contenente i video passati
     */
    public function getResultsVideosSearchPalinsesto($videos){
        $this->assignVar("data_wid", $videos);
        return $this->fetchTpl('vidwiz_vid_searchbox_widget');
    }
    
    public function getContestsWid($activeContests){
        $debug = USingleton_vidwiz::getInstances("UDebug_vidwiz");
        if($activeContests == false) {
            $this->assignVar("noContests","false");
            }
        else
            $this->assignVar("activeContests_wid", $activeContests);
        if(is_user_logged_in()) $this->assignVar("loggedin","true");
        $menu = $this->fetchTpl('vidwiz_vid_contests_widget');
        return $menu;
    }
    
    public function getContestsNaviWid($activeContests,$all){
        $debug = USingleton_vidwiz::getInstances("UDebug_vidwiz");
        $this->assignVar("activeContestsNavi_wid", $activeContests);
        $this->assignVar("allLink", $all);
        $menu = $this->fetchTpl('vidwiz_vid_contests_navi_widget');
        return $menu;
    }
}

?>
